var chalk = require('chalk');
const pluginName = 'FailedPlugin';

class FailedPlugin {
    apply(compiler) {
        //编译失败时处理
        compiler.hooks.failed.tap(
            pluginName,
            (error) => {
                console.log(`webpack系统级别错误--->${pluginName}`);
                console.log('CAP-H5-BUILD-FAILED');
            }
        );
    }
}

module.exports = FailedPlugin;